Docs: simplify turtle tutorial's star example code - #155232
Open
m-aciek wants to merge 3 commits into
Open
Conversation
distance(start) should be easier to understand than counting the length of a vector
Documentation build overview
13 files changed ·
|
Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland
approved these changes
Aug 9, 2026
Member
There was a problem hiding this comment.
Can you please update this error message, on 3.15 we have:
>>> from turtle import *
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
from turtle import *
File "/home/stan/dev/cpython/Lib/turtle.py", line 101, in <module>
import tkinter as TK
File "/home/stan/dev/cpython/Lib/tkinter/__init__.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: Standard library module '_tkinter' was not found
Contributor
Author
There was a problem hiding this comment.
Or does it require some generalisation as different environments can have the error message customised? 🤔
Member
There was a problem hiding this comment.
Or does it require some generalisation as different environments can have the error message customised?
In that case, it will hopefully be more helpful and will include instructions.
| from turtle import * | ||
|
|
||
| If you run into a ``No module named '_tkinter'`` error, you'll have to | ||
| If you run into a ``Standard library module '_tkinter' was not found`` error, you'll have to |
Member
There was a problem hiding this comment.
Can you wrap the line please.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

distance(start)should be easier to understand for students than counting the length of the position vector.The changed code is equivalent to the original, doesn't change the drawing.
cc @evildmp (author of the docs fragment)